package com.taxi.util;

import cn.hutool.extra.emoji.EmojiUtil;

/**
 * @Author Dell
 * @Date 2018/10/16 11:42
 */
public class LoggerUtil {

    public static String parseParams(Object[] params) {

        if (null == params || params.length <= 0) {
            return "传入参数 0 个";

        }
        StringBuffer param = new StringBuffer("传入参数 # 个:[ ");
        int i = 0;
        for (Object obj : params) {
            i++;
            if (i == 1) {
                param.append(obj == null ? "" : EmojiUtil.toUnicode(obj.toString()));
                continue;
            }
            param.append(" ,").append(obj == null ? "" : obj.toString());
        }
        return param.append(" ]").toString().replace("#", String.valueOf(i));

    }

}
